import 'package:flutter/material.dart';
import 'package:hao_ke/utils/dio_http.dart';
import 'package:hao_ke/pages/utils/scoped_model_helper.dart';
import '../pages/auth/auth.dart';

class EmployeeWidget extends StatefulWidget {
  const EmployeeWidget({super.key});

  @override
  State<EmployeeWidget> createState() => _EmployeeWidgetState();
}

class _EmployeeWidgetState extends State<EmployeeWidget> {

  List<Widget> items = [];

  @override
  Widget build(BuildContext context) {
    return Container(
      child: DropdownButtonFormField(
        items: [
          DropdownMenuItem(value: 1, child: Text('张三1'),),
          DropdownMenuItem(value: 2, child: Text('张三2'),),
          DropdownMenuItem(value: 3, child: Text('张三3'),),
          DropdownMenuItem(value: 4, child: Text('张三4'),),
          DropdownMenuItem(value: 5, child: Text('张三5'),),
        ],
        onChanged: (int? value) {},
      )
    );
  }

  @override
  void initState() {
    super.initState();
    _getEmployee();
  }

  _getEmployee() {
    DioHttp().init(context, ScopedModelHelper.getModel<AuthModel>(context).token).get("");
  }
}
